This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
notesdocument.getNoteID() gets the correct value, so there's something wrong with getting the agent.
I've tried putting a button in to call an agent in the same database and run on server, passing a noteID and msgboxing a value from the relevant document in the agent and it works fine. My code was:
var myAgent:NotesAgent = database.getAgent("test");
myAgent.runOnServer(profile.getNoteID())
"profile" is the DominoDocument data source on the XPage. My agent was also Agent List with target None. I notice your code has the agent in brackets, by accident I missed those out and it found the agent fine, so I'm not sure if tha' the problem. Switching on the default error page will show you which line the code is faiing on though.
Regards
Paul
Feedback response number WEBB7UMKXD created by ~Maria Xanjumiberg on 08/05/2009